home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / update_h / rsu15a / rsu.txt < prev    next >
Text File  |  1995-05-14  |  59KB  |  1,739 lines

  1.                          RSU 1.5
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.     Remote Software Update for Networks-Documentation
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. Copyright (c) 1992-1995 Burkhard Daniel & Hans-Georg Michna
  27.  
  28.  
  29.                     Table of Contents
  30.  
  31.  
  32. Shareware Licensing and Registration    3
  33. Support    5
  34. Disclaimer    5
  35. Introduction    5
  36. How RSU Works    7
  37. Installing RSU    7
  38. RSU Server Preparation    7
  39. Workstation Preparation    7
  40. The RSU Development Cycle    8
  41. Steps in the RSU Development Cycle    8
  42. Prepare an RSU Test Workstation    8
  43. Create and Test the New Module    9
  44. Protect Users From Your Tests    9
  45. Upload the New Module to the RSU 
  46. Server    9
  47. Adapt the RSU Program    9
  48. Test the New RSU Program    10
  49. Activate the New RSU Program    10
  50. Programming RSU    10
  51. General Rules    10
  52. Sample RSU Program    11
  53. Execution Sequence    12
  54. Alphabetical List of Commands    12
  55. General Command Syntax and Semantics    12
  56. Sections    13
  57. Environment Variables    13
  58. DOS Commands    14
  59. Echo    14
  60. Goto    14
  61. If    15
  62. IniAddLine    17
  63. IniChangeLine    17
  64. IniCopyLine    17
  65. IniCopySection    18
  66. IniDeleteLine    18
  67. IniDeleteSection    18
  68. SynchronizeDir    18
  69. SynchronizeDir (Old Syntax)    21
  70. Brief Command Overview    23
  71.  
  72.  
  73. RSU.DOC [64] 14-May-1995
  74.  
  75.  
  76. Shareware Licensing and Registration
  77.  
  78. RSU including its documentation files is Copyright (c) 1992-1995 
  79. Burkhard Daniel and Hans-Georg Michna. It is distributed under 
  80. the Shareware concept. Its use on isolated PCs, for example to 
  81. change settings in WIN.INI through batch files without the 
  82. involvement of any network file server is free, even if the 
  83. computer is connected to a network. As soon as RSU is used to 
  84. copy files from a network file server to a user's local storage 
  85. or to copy any parts of files of the Windows INI type from a 
  86. network file server, however, its free use is restricted to a 
  87. 30 day trial period. After that the shareware fee has to be 
  88. paid, if the program is still used.
  89.  
  90. Since the combinations of file servers and workstations can be 
  91. rather involved, some specifications are in order. If RSU is 
  92. used to manipulate shared files on other file servers (for 
  93. example several slave servers being updated from one master 
  94. server), then each target file server being updated counts only 
  95. as one user, as long as no individual workstation files are 
  96. modified on it. In other words, user workstations do not count 
  97. if RSU is not used to alter their individual files like 
  98. CONFIG.SYS, AUTOEXEC.BAT, WIN.INI, SYSTEM.INI, PROGMAN.INI, 
  99. PROTOCOL.INI or NET.CFG. A special case is that each 
  100. workstation has its individual files in a workstation specific 
  101. directory on a file server and RSU is used to update the 
  102. workstations' individual files on that file server (example: 
  103. diskless workstations). In this case, each workstation should 
  104. be counted as one user, since RSU is doing exactly the same 
  105. amount of work as if the workstation specific files were on 
  106. local workstation disks.
  107.  
  108. The shareware fee for RSU 1.x is US $59.00 or DM 85.00 (German 
  109. Mark) for each group of up to 100 users. In other words, if the 
  110. program is used for 1 to 100 users, the fee is US $59.00 or DM 
  111. 85.00. If it is used for 101 to 200 users, the fee is US 
  112. $118.00 or DM 170.00, for 201 to 300 users US $177.00 or DM 
  113. 255.00 and so on. Prices may change in future versions if the 
  114. exchange rate changes considerably. Future enhanced versions of 
  115. RSU may be more expensive.
  116.  
  117. In Germany, add the legally prescribed Value Added Tax 
  118. (currently 15%).
  119.  
  120. The program contains no technical means to enforce payment 
  121. other than noting the requirement on screen when an 
  122. unregistered copy of RSU is started.
  123.  
  124. To pay the fee through CompuServe log on to CompuServe and 
  125. enter the command: GO SWREG. Search for the keyword RSU and 
  126. register according to the choices you get on screen. Each 
  127. single registration or license is good for up to 100 users.
  128.  
  129. Alternatively, send a check and your e-mail address (or fax 
  130. number) to one of the following addresses.
  131.  
  132. USA:    A.C.I. Micro, Mark Jordan, 45 Roland, Winchester, MO 
  133. 63021
  134.  
  135. World:    A.C.I. Micro, Hans-Georg Michna, Notingerweg 42, D-
  136. 85521 Ottobrunn
  137.  
  138. In Europe use a Eurocheque for DM 85 or equivalent for each 100 
  139. users.
  140.  
  141. In Germany add the legally prescribed Value Added Tax 
  142. (currently 15%).
  143.  
  144. If you require an invoice, please ask for it by e-mail or send 
  145. a purchase order to A.C.I. Micro in Germany. But please keep 
  146. bureaucracy to a minimum. If you can, please register directly 
  147. through CompuServe's SWREG service, which is much more 
  148. convenient and probably cheaper for you as well as for us. 
  149. Within the European community please add your VAT ID. The VAT 
  150. ID of ACI Micro is: DE 129 2759 98
  151.  
  152. This is a sample SWREG session in CompuServe:
  153.  
  154. !go cis:swreg   <---{User entry after exclamation mark}
  155. Shareware Registration SWREG
  156.  
  157.  1 Instructions to Register Shareware
  158.  2 Register Shareware
  159.  3 Instructions to Submit Shareware
  160.  4 Submit Shareware (Authors)
  161.  5 Shareware Beta Forum  +
  162.  6 ASP/Shareware Forum  +
  163.  7 Provide Feedback
  164.  8 Frequently Asked Questions
  165. !2   <---{User entry after exclamation mark}
  166.  
  167. ...
  168.  
  169. Press <CR> to continue!   <---{User entry (return key) 
  170. after exclamation mark}
  171.  
  172. Please select the geographic region
  173. for which you will be registering shareware.
  174.  
  175.  1 United States
  176.  2 Canada/Mexico
  177.  3 Europe
  178.  4 Asia/Pacific Rim
  179.  5 Central/South America
  180.  6 Africa
  181.  7 Middle East
  182.  8 Australia/New Zealand
  183.  
  184. Enter region number: 1   <---{User entry after colon}
  185. Register Shareware
  186.  
  187. SEARCH BY:
  188.  
  189.  1 Registration ID
  190.  2 Title
  191.  3 File Name
  192.  4 Author's User ID
  193.  5 Author's Name
  194.  6 Keywords (Categories)
  195.  
  196. Enter choice!6   <---{User entry after exclamation mark}
  197. Register Shareware
  198.  
  199. Enter Keyword (ex. - GAMES): rsu
  200.  
  201. Reg ID: 552                       Fee (US$): 59.00
  202.                     Shipping/Handling (US$): 0.00
  203.  
  204. Title: RSU Version 1
  205.  
  206. File Name: RSUX.EXE               Author: Hans-Georg 
  207. Michna [74776,2361]
  208. Size: 69200                       Compression: LHA
  209. Computer Type/Operating Systems:  DOS, WINDOWS, OS/2
  210.  
  211. Support: CompuServe Mail to 74776,2361
  212.  
  213. Forum: GO NOVLIB       Library: Shareware              
  214. Library Number: 15
  215.  
  216. RSU V1.0 (Remote Software Update for DOS) is a program 
  217. that can
  218. - determine whether a user has the latest update level,
  219. - copy, delete, add lines or whole sections from one INI 
  220. file to another,
  221. - add multiple similar lines (like several device= lines 
  222. in SYSTEM.INI),
  223. - insert environment variables,
  224. - synchronize directories, i.e. make them equal without 
  225. unnecessary copying
  226. and more. Shareware $50 for 100 users. Upload by author.
  227.  
  228. Would You Like to Register? (Y/N) y   <---{User entry 
  229. after "(Y/N)"}
  230.  
  231. When you license RSU, you will receive information including 
  232. hints on how to upgrade and a special key to turn RSU into a 
  233. registered version, but you will not normally receive any paper 
  234. mail. Neither will you receive the program itself, which is 
  235. available only on CompuServe and on the Internet. You should 
  236. retrieve updates from wherever you received the program in the 
  237. first place. From time to time you may receive information on 
  238. upgrades and related programs.
  239.  
  240. The program may be freely distributed as long as the files stay 
  241. together unaltered and packed in one file using an archiving 
  242. program like PKZIP, LHA or similar. It is not allowed to add 
  243. any other files other than minor additions that do not exceed 
  244. the size of the original files. It is not allowed to distribute 
  245. RSU as part of another program or package because we fear that 
  246. this might look as if RSU may no longer require its shareware 
  247. fee payment which it always does according to the rules 
  248. outlined above.
  249.  
  250. We have in the past sent information by e-mail when there were 
  251. significant changes to RSU. But you have to download the new 
  252. versions on your own. You don't have to pay anything again for 
  253. any upgrades to RSU version 1.x. Should there be a significant 
  254. technological change, like a new operating system, like a 32 
  255. bit OS, then there might be an entirely new version of RSU, 
  256. which will be handled differently, probably as an entirely 
  257. separate product.
  258.  
  259. Support
  260.  
  261. Support is available via e-mail from Hans-Georg Michna 
  262. 74776,2361and from Burkhard Daniel 100342,2050. This support is 
  263. free. In our experience, luckily, RSU needs very little 
  264. support, because it doesn't seem to cause many problems. But if 
  265. you need help, usually in the beginning, please feel free to 
  266. send e-mail. The same holds for questions, remarks or proposals 
  267. for future enhancements of RSU. You can also reach us through 
  268. Internet mail: 74776.2361@compuserve.com and 
  269. 100342.2050@compuserve.com (Please note the periods in the 
  270. place of the commas).
  271.  
  272. Disclaimer
  273.  
  274. At the present state of software technology it is not possible 
  275. to create error-free software. RSU may contain errors. Anybody 
  276. using it should take precautions like creating safety backups 
  277. in case a defect causes damage to any computer or data. The 
  278. authors of RSU can under no circumstances be held responsible 
  279. for any damage.
  280.  
  281. Microsoft⌐ is a trademark of Microsoft, Inc.
  282.  
  283. Introduction
  284.  
  285. RSU (Remote Software Update) is a program that updates the 
  286. software on many individual workstation1 PCs connected to a 
  287. file server. The file server, when equipped with RSU, becomes 
  288. an RSU server.
  289.  
  290. The RSU program does not run on the RSU server, however. It 
  291. runs only on the workstations. The RSU server consists only of 
  292. subdirectories and files on the file server.
  293.  
  294.  
  295. Sample RSU installation
  296.  
  297. The fundamental idea is that all workstation configurations are 
  298. stored on the RSU server. RSU then copies the appropriate 
  299. modules to each workstation while retaining individual settings 
  300. or individual software on the workstations.
  301.  
  302. The file server used for RSU does not have to be the same file 
  303. server that is used for normal work. It is necessary, of 
  304. course, that users log in to the RSU server from time to time 
  305. to get the topical remote software update.
  306.  
  307. Since the file server does not usually run DOS a separate RSU 
  308. test workstation is needed to develop and test the 
  309. configurations. If testing on different hardware is needed then 
  310. one RSU test workstation is needed for each hardware setup. RSU 
  311. test workstations can be used for other work when they are not 
  312. being used for RSU development. Their RSU related configuration 
  313. has to be totally reset, however, before it is used for 
  314. testing. RSU can
  315.  
  316.     copy predetermined files from the RSU server to the 
  317. workstations,
  318.  
  319.     change the contents of subdirectories, even whole 
  320. subdirectory trees, on the workstation PCs such that they 
  321. become equal to their parents on the RSU server, by adding, 
  322. deleting or overwriting files on the target PC,
  323.  
  324.     exclude certain subdirectories and files from directory 
  325. replication,
  326.  
  327.     report all changes when synchronizing directories,
  328.  
  329.     add, change, copy or delete certain sections or certain lines 
  330. in INI files like WIN.INI and SYSTEM.INI,
  331.  
  332.     copy or delete sections in text files like AUTOEXEC.BAT and 
  333. CONFIG.SYS,
  334.  
  335.     find out whether each workstation is already up to date and 
  336. skip the updating process,
  337.  
  338.     detect BIOS signatures of certain hardware and, for example, 
  339. automatically install the appropriate drivers.
  340.  
  341. How RSU Works
  342.  
  343. Since the file server or any program running on any workstation 
  344. has normally no access to any local disks the main RSU program 
  345. has to run on each workstation to work its magic. The most 
  346. convenient way to achieve this is to run it each time any user 
  347. logs in to the RSU server.2
  348.  
  349. This can be achieved in different ways on different operating 
  350. systems. On a Novell network, for example, a command can be 
  351. called up after the system login script finishes, by using the 
  352. Novell EXIT "<command>" syntax or by calling it in the middle 
  353. of the login script with the # syntax. See the manual of your 
  354. network for details. RSU can be called from a DOS batch file. 
  355. It has one command line parameter which is the path of the RSU 
  356. program file. Example:
  357.  
  358. f:\rsu\rsu.exe  f:\rsu\rsu.prg
  359.  
  360. RSU.EXE will execute the RSU program file. Files are typically 
  361. copied from the RSU server to the local disk or modified on the 
  362. local disk. Instead of the local disk the individual user 
  363. storage space may also be on a file server. In this case each 
  364. user's private storage should be mapped to a drive like U:, 
  365. such that each user sees his private storage area when he 
  366. refers to U:.
  367.  
  368. Installing RSU
  369.  
  370. RSU Server Preparation
  371.  
  372. Each file server can be a RSU server. The basic method is to 
  373. keep a mirror image of a workstation in a RSU server directory, 
  374. for example in F:\RSU\WSIMAGE. There can be several such 
  375. directories for several different configurations. The 
  376. configurations have to be created and tested on test 
  377. workstations, then copied to the RSU server. In addition the 
  378. RSU server needs one other directory with read-only access for 
  379. RSU.EXE and the RSU program file (example: RSU.PRG, example of 
  380. RSU read-only directory: F:\RSU).
  381.  
  382. The management of more than one workstation configuration can 
  383. easily achieved by creating small signal files on the different 
  384. workstations which indicate the configuration type. The 
  385. existence of any of these signal files can then be queried by a 
  386. simple "If Exist" command. Another method is the BIOS scan, 
  387. using RSU's BIOS function. Thus the BIOS version of the 
  388. computer or, for example, of the display adapter can be 
  389. determined automatically and the appropriate configuration 
  390. installed without any manual intervention.
  391.  
  392. Workstation Preparation
  393.  
  394. Before installing RSU you have to make sure that all 
  395. workstations connected to the RSU server have a valid minimal 
  396. installation. The absolute minimum would be an installed DOS 
  397. and the minimal network drivers to be able to connect to the 
  398. server.
  399.  
  400. It is recommended that you have an initial workstation setup 
  401. procedure to erase all RSU related directories and files from a 
  402. workstation and recreate the whole minimal setup from scratch. 
  403. This could be done with a batch file like INSTALL.BAT on the 
  404. RSU server. This will be very useful for users if they have 
  405. somehow destroyed vital files on their workstation. They will 
  406. then have a way to get up and running again if everything else 
  407. fails and no service person is available.
  408.  
  409. It is also conceivable to use RSU to such an extent that each 
  410. and every file on the workstation is covered by RSU. This would 
  411. have the advantage that every workstation would recover from 
  412. any loss or mutilation of files automatically when logging on 
  413. to the RSU server. But this will often not be practicable for 
  414. performance or other reasons.
  415.  
  416. RSU will run inside Windows and Windows NT. Note, however, that 
  417. Windows or Windows NT may keep certain files open, such that 
  418. these files themselves cannot be copied or updated. On Windows 
  419. NT, RSU, like many other DOS programs, requires read and write 
  420. access to the file CMOS.RAM in the SYSTEM32 directory. RSU, 
  421. like any DOS or 16 bit Windows program, cannot use long file 
  422. names, but it will use the automatic substitutes generated by 
  423. Windows NT.
  424.  
  425. The RSU Development Cycle
  426.  
  427. Steps in the RSU Development Cycle
  428.  
  429. The RSU development cycle is the process of developing a new 
  430. configuration. Frequently this will just be a small change in 
  431. an existing configuration, but it could also be an entirely new 
  432. configuration for a new type of workstation, for example. 
  433. Development proceeds in these steps:
  434.  
  435. 1.    Prepare a RSU test workstation by making it equivalent 
  436. to the topical RSU update level.
  437.  
  438. 2.    Create and test a new configuration or modify the 
  439. existing one on a test workstation.
  440.  
  441. 3.    Temporarily protect users from your RSU server changes.
  442.  
  443. 4.    Upload (copy) the new workstation configuration to the 
  444. RSU server or modify the existing one on the RSU server.
  445.  
  446. 5.    If necessary, adapt the RSU program file (example: 
  447. RSU.PRG).
  448.  
  449. 6.    Test the new RSU setup on a test workstation.
  450.  
  451. 7.    Activate the new setup, such that it gets installed on 
  452. all target workstation PCs (undo step 3).
  453.  
  454. In many cases this development cycle can be shortened by 
  455. skipping certain actions if their effect is minimal or if the 
  456. number of workstations is low enough such that some risk can be 
  457. taken.
  458.  
  459. The following sections describe these actions in detail.
  460.  
  461. Prepare an RSU Test Workstation
  462.  
  463. First you have to make sure that your RSU test workstation is 
  464. equal to a topical workstation elsewhere in the network. If the 
  465. test workstation has not been used for anything that might have 
  466. altered the files and directories concerned then it can be used 
  467. right away. If not, and whenever there are any doubts, the test 
  468. workstation should be installed fresh from the RSU server. It 
  469. is a good precaution to log in once after installation and 
  470. obtain the latest changes from the RSU server to make sure they 
  471. are included in the workstation image on the RSU server.
  472.  
  473. The RSU update level information can be stored in any file for 
  474. each workstation. You only have to edit this file or touch it 
  475. such that the file date or time is changed to force an update.
  476.  
  477. Start the RSU program, normally by logging in to the RSU 
  478. server. The test workstation should automatically be updated to 
  479. the topical update level. After the test workstation is up to 
  480. the present standard you can now make the desired changes.
  481.  
  482. Create and Test the New Module
  483.  
  484. Now you can make the desired modification on the test machine 
  485. only. Test thoroughly, since all your users who use that module 
  486. will depend on your conscientiousness.
  487.  
  488. Protect Users From Your Tests
  489.  
  490. As soon as you touch the RSU server all users who happen to use 
  491. the server will receive any modification. Therefore you have to 
  492. make sure that this does not happen.
  493.  
  494. There are several ways to protect users:
  495.  
  496. 1.    Deactivate the whole RSU server until you are done with 
  497. all changes. One way is to rename the RSU program. Without it 
  498. RSU will not be able to do anything. Another is to activate a 
  499. jump over the RSU part of the controlling batch file.
  500.  
  501. 2.    Leave the RSU server running and create a second RSU 
  502. server at least for the module you intend to work on. This is 
  503. not quite so difficult as it sounds. It may be necessary for 
  504. bigger changes that require some time to work out.
  505.  
  506. 3.    If you are making a very small change and you are 
  507. absolutely sure that even a mistake can do no harm you may 
  508. risk to work on the hot system. But be careful! Depending on 
  509. the number of workstations and likelihood of a login you 
  510. should be able to make the change within seconds. This might 
  511. be viable if you just want to change a few files, for 
  512. example. Again do not forget to change the date and time of 
  513. the RSU update level file afterwards, so all users get a new 
  514. update when they log in.
  515.  
  516. Upload the New Module to the RSU Server
  517.  
  518. After you have tested the new configuration thoroughly on your 
  519. test machine you can now copy the modifications to the RSU 
  520. server (for example to the F:\RSU\WSIMAGE directory and its 
  521. subdirectories). It is useful to have a program that can detect 
  522. the difference between files on two drives like the Norton 
  523. CommanderT with its "Compare directories" command. In any case 
  524. be sure to copy all changes from the test machine to the RSU 
  525. server.
  526.  
  527. Adapt the RSU Program
  528.  
  529. Now change the RSU program (example: F:\RSU\RSU.PRG) if 
  530. necessary. The modified RSU program should be able to copy all 
  531. modifications from the RSU server area to any workstation PC.
  532.  
  533. If you make changes to files by means of direct manipulation by 
  534. the RSU program, for example with IniChangeLine, be sure to 
  535. make those changes on the original files on the RSU server as 
  536. well, such that users who do an install from scratch also get 
  537. them immediately before they receive the next RSU update.
  538.  
  539. Test the New RSU Program
  540.  
  541. After the update is entirely in place but not yet activated you 
  542. should test it before releasing it to all users. For this you 
  543. either need a second test machine or you have to reset the 
  544. first one to the previous configuration which is still standard 
  545. for all other users.
  546.  
  547. Then you have to make sure that the new update affects only the 
  548. test machine but not yet all the other users. There are several 
  549. ways to achieve this. The easiest is to modify the RSU program 
  550. file such that only the testing user gets the update. Example:
  551.  
  552. ...
  553. If %USER% <> SUPERVISOR Then
  554.    Goto Not_yet
  555. End If
  556. rem   Here enter the RSU commands to be tested.
  557. Not_yet:
  558. ...
  559.  
  560. This sample batch file fragment presumes that the network user 
  561. name was written into the environment variable USER, for 
  562. example with the Novell Netware login script command:
  563.  
  564. DOS SET USER="%USER_ID".
  565.  
  566. Check whether the update is correct. You may have to test each 
  567. configuration separately if there are several.
  568.  
  569. Activate the New RSU Program
  570.  
  571. Finally, after you have convinced yourself that the new update 
  572. works correctly, you can release it to all users by removing 
  573. any blocking commands you might have inserted. From that very 
  574. moment all users who log on will receive the update.
  575.  
  576. Programming RSU
  577.  
  578. General Rules
  579.  
  580. RSU is an interpreter for the RSU control language which 
  581. strongly resembles BASIC and, to some extent, DOS batch files. 
  582. The RSU program is the file which controls all RSU operations. 
  583. It should reside on the RSU server, for example as 
  584. F:\RSU\RSU.PRG. All users should have read-only access to it.
  585.  
  586. RSU is started from DOS with either of the following commands:
  587.  
  588. RSU <program file name>
  589. RSU.EXE <program file name>
  590. RSU <program file name> /debug
  591. RSU.EXE <program file name> /debug
  592.  
  593. The /debug switch produces a display of all commands, as they 
  594. are executed.
  595.  
  596. As long as the program is unregistered, it always displays a 
  597. shareware registration screen first. Apart from this, however, 
  598. the program is fully functional and may be tested with all 
  599. functions for 30 days. After that time the program must be 
  600. registered for further legal use, although the program would 
  601. technically still function properly.
  602.  
  603. Sample RSU Program
  604.  
  605. This is an example of an RSU.PRG file:
  606.  
  607. rem   RSU.PRG file
  608.  
  609. rem   First determine whether the user already has the 
  610. latest version:
  611.  
  612. If c:\rsu\version.txt Equal f:\rsu\version.txt Then
  613.    echo Your workstation has the latest update level.
  614.    Goto Finish
  615. End If
  616.  
  617. rem   Let user know what's going to happen to his 
  618. computer:
  619.  
  620. type f:\rsu\version.txt
  621. pause
  622.  
  623. rem   Modifications to WIN.INI:
  624.  
  625. IniCopySection f:\rsu\wsimage\win31\win.ini 
  626. c:\win31\win.ini [fonts]
  627. IniCopySection f:\rsu\wsimage\win31\win.ini 
  628. c:\win31\win.ini [devices]
  629. IniDeleteSection c:\win31\win.ini [ObscureOldProgram]
  630. IniCopyLine f:\rsu\wsimage\win31\win.ini c:\win31\win.ini 
  631. [windows] load
  632. IniDeleteLine c:\win31\win.ini [fonts] Swiss=
  633. IniChangeLine c:\win31\win.ini [mail] mailbox=%USER%
  634.  
  635. rem   Modifications to SYSTEM.INI:
  636.  
  637. IniAddLine c:\win31\system.ini [display] svgamode=98
  638.  
  639. rem   Synchronization of user files:
  640.  
  641. SynchronizeDir
  642.    From f:\rsu\wsimage\win31
  643.    To   c:\win31Add
  644. End SynchronizeDir
  645.  
  646. SynchronizeDir
  647.   From f:\rsu\wsimage\util
  648.   To   c:\util
  649.   Add
  650.   Overwrite
  651.   Delete
  652.   Subdirectories
  653. End SynchronizeDir
  654.  
  655. rem   Users with HappyVGA adapters get a new driver and 
  656. support
  657. rem   utilities. This requires that such users have a 
  658. signal file
  659. rem   c:\rsu\happyvga.sig:
  660.  
  661. If Exist c:\rsu\happyvga.sig Then
  662.   SynchronizeDir
  663.     From f:\rsu\wsimage\happyvga
  664.     To   c:\happyvga
  665.     Add
  666.     Overwrite
  667.     Delete
  668.     Subdirectories
  669.   End SynchronizeDir
  670. End If
  671.  
  672. rem   Now install version text file to make sure that this
  673. rem   user doesn't get the same update again:
  674.  
  675. copy f:\rsu\version.txt c:\rsu
  676.  
  677. Finish:
  678.  
  679. rem   End Of File
  680.  
  681. Execution Sequence
  682.  
  683. RSU is a pure and simple interpreter. This has consequences 
  684. especially when using the Goto command in connection with If, 
  685. Then, Else constructs. RSU takes these commands exactly in the 
  686. sequence they are processed. This means that a Goto jump into 
  687. an If structure can cause unexpected results if the programmer 
  688. isn't aware of the actual processing sequence. Therefore it is 
  689. not advisable to jump into an If command. Jumping out of an If 
  690. command doesn't hurt. The If construct is simply never 
  691. completed. But if it is done many times, for example in a loop, 
  692. it will eventually cause a memory overflow. You should 
  693. therefore try to use the Goto command sparingly and prudently. 
  694. Ghastly mistakes can happen if the interpreter encounters, for 
  695. example, an Else command after jumping out of an If construct, 
  696. because the interpreter would assume that the Else belongs to 
  697. the last encountered If command.
  698.  
  699. Alphabetical List of Commands
  700.  
  701. General Command Syntax and Semantics
  702.  
  703. All control files are text files in which each line is followed 
  704. by a carriage return/line feed pair (13dec and 10dec).
  705.  
  706. Spaces and tab characters in the beginning of any line are 
  707. totally ignored. In effect it is as if those characters were 
  708. removed before executing the RSU.PRG program.
  709.  
  710. Lines beginning with "REM  " or ";" (a semicolon) are treated 
  711. as comments and not otherwise executed.
  712.  
  713. Upper and lower case are functionally equivalent. However, the 
  714. case is retained when information is forwarded into another 
  715. file.
  716.  
  717. Command parameters are separated by spaces, with the exception 
  718. of section headers (section name in brackets) and INI lines 
  719. after a section header. If a parameter itself contains one or 
  720. more spaces, it has to be enclosed in double quotes (character 
  721. no. 34 in the ASCII/ANSI alphabet), so it is not mistaken for 
  722. several separate parameters. If a quote character itself is to 
  723. be included, two adjacent quote characters have to be written, 
  724. but this is possible only within another pair of quotes.
  725.  
  726. Examples:
  727. If Bios(C000-C080) = "ATI GRAPHICS" Then
  728.    ...
  729. End If
  730.  
  731. If %COMPUTER_TYPE% = "Label ""Taiwan""" Then
  732.    ...
  733. End If
  734.  
  735. The second example compares the environment variable 
  736. COMPUTER_TYPE with the following text, including the two 
  737. quotes:   Label "Taiwan"
  738.  
  739. If the first word in any line is a valid RSU command then it is 
  740. executed. If not the line is deemed to be a DOS command and is 
  741. forwarded to the DOS command processor. Note, however, that not 
  742. every DOS command can be used. For example, the DOS command SET 
  743. has no effect because it is running under a secondary command 
  744. processor that has no access to the primary environment.
  745.  
  746. In the syntax definitions below, a few special characters and 
  747. words are used that have a special meaning.
  748.  
  749. A word enclosed in angle brackets is a placeholder for a user 
  750. defined, variable entry:
  751.  
  752. < >
  753.  
  754. The following placeholder stands for any valid RSU command:
  755.  
  756. <command>
  757.  
  758. An ellipsis stands for "more of the same":
  759.  
  760. ...
  761.  
  762. Braces and vertical bars are used to define a user choice of 
  763. one out of several units. Only one can and must be chosen:
  764.  
  765. { <choice 1> | <choice 2> | <choice 3> }
  766.  
  767. Sections
  768.  
  769. Several commands work on sections in .INI files. A section is 
  770. recognized by its header. It ends before the next section 
  771. header. A section header consists of a section name in 
  772. brackets. Examples:
  773.  
  774. [windows]
  775.  
  776. [HPPCL5A,LPT1:]
  777.  
  778. [Microsoft Word]
  779.  
  780. The section header must begin in cloumn 1, i.e. in the leftmost 
  781. position of a line. Technically spoken, the opening bracket 
  782. must immediately follow the carriage return, line feed pair 
  783. that ends the previous line, or it must be the first byte of 
  784. the whole file. All lines following the section header belong 
  785. to this section until another section header follows.
  786.  
  787. Note that section headers can contain spaces. RSU still 
  788. recognizes the section header by the enclosing brackets. You 
  789. don't need double quotes when referring to a section header in 
  790. an RSU command.
  791.  
  792. To facilitate manipulation of sections in files like 
  793. AUTOEXEC.BAT or CONFIG.SYS, a second, alternative form of 
  794. section header is also recognized, which consists of the 
  795. abbreviation REM in upper, lower or mixed case, followed by 
  796. exactly one space, followed by a section header as described 
  797. above. The R in REM must be in the leftmost column. Examples:
  798.  
  799. REM [drives]
  800.  
  801. Rem [NETWORK DRIVERS]
  802.  
  803. rem [User Specific Settings]
  804.  
  805. Warning:    Never use the 
  806. alternative REM syntax inside an RSU command file. All 
  807. RSU commands work without containing the word REM, even 
  808. if the target files contain it.
  809.  
  810. Hint:    If you want to turn such REM lines into real comments 
  811. rather than RSU section headers, insert at least a 
  812. second space or any other characters between REM and [.
  813.  
  814. Hint:    While all RSU commands will recognize and accept this 
  815. alternative syntax and work on it and in the sections 
  816. thus designated, only the command IniCopySection can 
  817. put such a section header into a file.
  818.  
  819. Environment Variables
  820.  
  821. Environment variables can be inserted in any command with the 
  822. syntax:
  823.  
  824. %<environment variable>%
  825.  
  826. Example:
  827. IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  828.  
  829. This example will take the name from the USER= entry in the 
  830. environment and substitute it for %USER% before executing the 
  831. IniChangeLine command. For example, if the environment contains 
  832. an entry reading:
  833.  
  834. USER=DANIEL
  835.  
  836. then the command above will be changed to:
  837.  
  838. IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=DANIEL
  839.  
  840. which is useful for example to save users the separate logging 
  841. in to Microsoft⌐ Mail.
  842.  
  843. The substitution happens before any quote characters are 
  844. processed, i.e. environment variables can be used inside 
  845. quotes. To use a percent character (%) for other purposes, you 
  846. have to write two adjacent percent characters (%%). However, 
  847. RSU cannot use environment variable names that contain percent 
  848. characters. You can use the double-percent feature only outside 
  849. environment variable names.
  850.  
  851. Environment variable names may contain spaces (example: %DEPT 
  852. NAME%). It is not necessary to enclose them in quotes because 
  853. of these spaces-RSU already recognizes the percent signs and 
  854. processes them before spaces are considered. But superfluous 
  855. quotes outside the variable name don't do any harm either.
  856.  
  857. Hint:    Novell Netware 3.11 can place essential system 
  858. information entries into the environment with the SET 
  859. <variable>="<text>" syntax of its login scripts. 
  860. Example of a command in a Netware login script:
  861.  
  862. SET USER="%USER_ID"
  863.  
  864. DOS Commands
  865.  
  866. Any command found in an RSU program file that is not a valid 
  867. RSU command is deemed to be a DOS command. A secondary command 
  868. processor (COMMAND.COM) is loaded and the command forwarded to 
  869. it and executed.
  870.  
  871. There is no error checking and no logging with DOS commands, so 
  872. be careful to test and use them properly.
  873.  
  874. Echo
  875.  
  876. This command simply echoes some text on the screen. It works 
  877. like the DOS command with the same name. It was incorporated 
  878. only to increase speed and to avoid unnecessary empty lines on 
  879. screen.
  880.  
  881. Syntax:
  882. Echo <text>
  883.  
  884. Example:
  885. Echo RSU is now installing new video drivers...
  886.  
  887. Goto
  888.  
  889. This command continues execution of the RSU program file at the 
  890. point after the label. The label can be anywhere else in the 
  891. program file but has to be in its own line, i.e. no other 
  892. command can follow in the line that contains the label.
  893.  
  894. A label must be at least two characters long, not counting the 
  895. colon. The reason for this is that c: means change to drive C:, 
  896. rather than a label C. Labels may contain letters, digits and 
  897. the underscore _. They may not contain spaces, umlauts or any 
  898. other special characters.
  899.  
  900. Syntax:
  901. Goto <label>
  902. ...
  903. <label>:
  904.  
  905. Example:
  906. Goto Finish
  907. ...
  908. Finish:
  909.  
  910. If
  911.  
  912. This command executes the other commands embedded between If 
  913. and End If only if the condition after the If is met.
  914.  
  915. In addition, an Else clause can be inserted. The commands after 
  916. the Else and before the final End If are only executed if the 
  917. condition after the If is not met.
  918.  
  919. The comparison operators  <  <=  =  >=  >  <>  determine 
  920. whether the character string to the left is less than, less or 
  921. equal, equal, greater or equal, greater than, unequal to the 
  922. string on the right of the operator, ignoring upper or lower 
  923. case. Thus  a  =  A  would count as true.
  924.  
  925. The operator "Exist" followed by a filename determines whether 
  926. the following file exists, similar to the equivalent DOS batch 
  927. command.
  928.  
  929. The operator "Equal" between two filenames determines whether 
  930. the two files are exactly equal in size, date and time.
  931.  
  932. A special form is the BIOS search. This allows to search a 
  933. certain range of memory addresses within the first megabyte for 
  934. a word. The syntax of the If clause is:
  935.  
  936. If Bios(<hexadr>-<hexadr>) = <text> Then
  937.  
  938. Example:
  939. If Bios(F000-F100) = AMI Then
  940.    Echo This computer has an AMI Bios.
  941. End If
  942.  
  943. The BIOS search allows only the equal operator = and cannot be 
  944. written with the search word on the left side of the equal 
  945. sign. The search is case insensitive. Note also that you have 
  946. to use double quotes if you want to search for more than one 
  947. word, because the present syntax uses the space as a delimiter 
  948. if not enclosed in double quotes. You may write:
  949.  
  950. If Bios(C000-C080) = "ati graphics ultra" Then
  951.    Echo ATi Graphics Ultra found.
  952. End If
  953.  
  954. Note that after the If and between any other elements on the 
  955. line one or more spaces are needed. Thus it would be wrong to 
  956. write:
  957.  
  958. If %USER%=DANIEL Then
  959.  
  960. The correct form is:
  961.  
  962. If %USER% = DANIEL Then
  963.  
  964. If any of the variables contains spaces, it must be enclosed in 
  965. double quotes. Apart from that, an If command with a comparison 
  966. operator must have exactly 5 words in the line.
  967.  
  968. Syntax (4 different forms):
  969.  
  970. If <condition> Then
  971.    <command>
  972.    ...
  973. End If
  974.  
  975. If <condition> Then
  976.    <command>
  977.    ...
  978. Else
  979.    <command>
  980.    ...
  981. End If
  982.  
  983. If Not <condition> Then
  984.    <command>
  985.    ...
  986. End If
  987.  
  988. If Not <condition> Then
  989.    <command>
  990.    ...
  991. Else
  992.    <command>
  993.    ...
  994. End If
  995.  
  996. <condition> = { <text 1> <comparison operator> <text 2> | 
  997. Exist <filename> | <filename 1> Equal <filename 2> } | 
  998. Bios(<hexadr>-<hexadr>) = <text>
  999.  
  1000. <comparison operator> = { < | <= | = | >= | > | <> }
  1001.  
  1002. <hexadr> = 0 .. FFFF
  1003.  
  1004. Examples:
  1005. If Not %USER% = SUPERVISOR Then
  1006.    Goto Finish
  1007. End If
  1008. ...
  1009. Finish:
  1010.  
  1011. If Not c:\rsu\version.txt Equal f:\rsu\version.txt Then
  1012.    copy f:\rsu\version.txt c:\rsu
  1013.    ...
  1014. Else
  1015.    echo You already have the latest version. No update 
  1016. necessary.
  1017. EndIf
  1018.  
  1019. If Not Exist c:\windows\win.ini Then
  1020.    echo Your disk is not properly installed. Please follow 
  1021.    echo the instructions to perform the base installation,
  1022.    echo then log on again.
  1023.    Goto Get_Out
  1024. End If
  1025.  
  1026. If Bios(F000-F200) = Dell Then
  1027.    c:\dell\keyb.com gr,,c:\dos\keyboard.sys
  1028. Else
  1029.    c:\dos\keyb.com gr,,c:\dos\keyboard.sys
  1030. End If
  1031.  
  1032. Hint:    End If can be written with or without a space between 
  1033. End and If, i.e. either "End  If" or "EndIf". The 
  1034. preferred form is: "End  If".
  1035.  
  1036. Warning:    Between each of 
  1037. two keywords, operators and operands one space is 
  1038. required.
  1039.  
  1040. Warning:    Do not use the 
  1041. Goto command to jump into an If - End If structure. Do 
  1042. not use the Goto command to jump out of an If - End If 
  1043. structure many times, for example in a loop with more 
  1044. than a few repetitions.
  1045.  
  1046. IniAddLine
  1047.  
  1048. This command is used to add a line where several lines have the 
  1049. same variable name, like for example the device= lines in 
  1050. SYSTEM.INI. It appends one further line to the section. If the 
  1051. section does not exist it is newly created and appended to the 
  1052. .INI file first.
  1053.  
  1054. The only exception occurs if the exact line, variable name and 
  1055. text, exists in the file already. In this particular case the 
  1056. command has no effect. In other words, the command does not 
  1057. produce exact duplicates of whole lines like:
  1058.  
  1059. device=VSHARE.386
  1060.  
  1061. device=VSHARE.386
  1062.  
  1063. Syntax:
  1064. IniAddLine <ini file> [<section name>] <variable 
  1065. name>=<text>
  1066.  
  1067. Example:
  1068. IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VSHARE.386
  1069.  
  1070. IniChangeLine
  1071.  
  1072. This command changes the text after the equals sign (=) in a 
  1073. certain section and a certain line in an .INI file. If the 
  1074. section does not exist it is newly created and appended to the 
  1075. .INI file first. If the line does not exist it is newly created 
  1076. and appended at the end of the section. If several lines with 
  1077. the same variable name exist in the section then this command 
  1078. is probably not appropriate and should not be used since it 
  1079. would change only one of the lines.
  1080.  
  1081. Syntax:
  1082. IniChangeLine <ini file> [<section name>] 
  1083. <variable>=<text>
  1084.  
  1085. Example:
  1086. IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  1087.  
  1088. Note that there is presently no command to change only part of 
  1089. a line. If something like this is desired one possible 
  1090. workaround is to use EDLIN in batch mode.
  1091.  
  1092. IniCopyLine
  1093.  
  1094. This command finds a certain line within a section in an .INI 
  1095. file and copies it into another .INI file. If a line with the 
  1096. same variable name to the left of the equals sign (=) already 
  1097. exists it is replaced with the new line. If several lines with 
  1098. the same variable name exist in the section then this command 
  1099. is probably not appropriate. It will work on the first 
  1100. occurrence of the variable. If the section does not exist in 
  1101. the target .INI file, it is newly created and appended to the 
  1102. .INI file first.
  1103.  
  1104. Syntax:
  1105.  
  1106. IniCopyLine <source ini file> <target ini file> [<section 
  1107. name>] <variable>
  1108.  
  1109. Examples:
  1110.  
  1111. IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI 
  1112. [windows] load
  1113.  
  1114. IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI 
  1115. [windows] load=
  1116.  
  1117. Both example lines do the same thing. Each one would search the 
  1118. file F:\RSU\WSIMAGE\WIN31\WIN.INI for the section [windows]. 
  1119. Within the section it would locate the line beginning with 
  1120. load= and copy it into the line with the same section and 
  1121. variable name in the file C:\WIN31\WIN.INI.
  1122.  
  1123. IniCopySection
  1124.  
  1125. This command works similar to the previous one but copies a 
  1126. whole section. If a section with the same name already exists 
  1127. in the target file, it is deleted and the new section copied 
  1128. and inserted in its place. IniCopySection also inserts an empty 
  1129. line before and after the section if there was none, to make 
  1130. the file easier to read and conform with the usual practice in 
  1131. Windows .INI files.
  1132.  
  1133. Syntax:
  1134. IniCopySection <source ini file> <target ini file> 
  1135. [<section name>]
  1136.  
  1137. Example:
  1138. IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI 
  1139. C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  1140.  
  1141. This example would copy the whole section [HPPCL5A,LPT1:] from 
  1142. F:\RSU\WSIMAGE\WIN31\WIN.INI to C:\WIN31\WIN.INI. If there was 
  1143. a section with that name before it will be overwritten and all 
  1144. information lost entirely. If the previous section contained 
  1145. more or other lines than the new those old lines will be lost.
  1146.  
  1147. IniDeleteLine
  1148.  
  1149. This command deletes a line in an .INI file.
  1150.  
  1151. Syntax:
  1152. IniDeleteLine <ini file> [<section name>] <variable>
  1153. IniDeleteLine <ini file> [<section name>] <variable>=
  1154. IniDeleteLine <ini file> [<section name>] 
  1155. <variable>=<value>
  1156.  
  1157. Examples:
  1158. IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  1159. IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  1160. IniDeleteLine C:\WIN31\SYSTEM.INI [386Enh] device=comm.drv
  1161.  
  1162. This example will search C:\WIN31\WIN.INI for the section 
  1163. [mail] and in this section for the line beginning with 
  1164. Polling=. This line will be deleted from WIN.INI. It will then 
  1165. search C:\WIN31\SYSTEM.INI, section [386Enh] and delete the 
  1166. line device=comm.drv. Note that, with this syntax, other 
  1167. device= lines are not affected. This makes it possible to 
  1168. change particular lines when the same variable occurs more than 
  1169. once, as usual with the device= lines in SYSTEM.INI.
  1170.  
  1171. IniDeleteSection
  1172.  
  1173. Syntax:
  1174. IniDeleteSection <ini file> [<section name>]
  1175.  
  1176. Example:
  1177. IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  1178.  
  1179. This example will search C:\WIN31\WIN.INI for the section 
  1180. [Microsoft Word]. The entire section will be deleted from 
  1181. WIN.INI.
  1182.  
  1183. SynchronizeDir
  1184.  
  1185. Makes the target directory equal to the source directory 
  1186. including all files, including files that have a read-only, 
  1187. hidden or system attribute.
  1188.  
  1189. SynchronizeDir handles all files regardless of their 
  1190. attributes. Attributes are copied with each file only if the 
  1191. Preserve subcommand is used. Without it the archive attribute 
  1192. is set and all other attributes are reset in the target file.
  1193.  
  1194. SynchronizeDir is a multi-line command and requires several 
  1195. subcommands to control its operation. Each subcommand has to be 
  1196. in one line. Empty lines and comment lines can also be used 
  1197. freely. The following subcommands can be used, and at least To 
  1198. and From and one other of them has to be used, otherwise 
  1199. SynchronizeDir will not do anything:
  1200.  
  1201. From    Write the source directory after this subcommand.
  1202.  
  1203. To    Write the target directory after this subcommand.
  1204.  
  1205. Delete    Delete files from the target directory if they don't 
  1206. exist in the source directory.
  1207.  
  1208. Add    Add files to the target directory if they are not there 
  1209. already.
  1210.  
  1211. Overwrite    Overwrite files 
  1212. in the target directory if they also exist in the 
  1213. source directory but are different (have different 
  1214. size, date or time). This subcommand may not be used 
  1215. together with the Conflict subcommand.
  1216.  
  1217. Conflict    Conflict 
  1218. management. This subcommand may not be used together 
  1219. with the Overwrite subcommand. If a file name exists in 
  1220. both source and target directories but with different 
  1221. size, date or time, then this is considered a conflict 
  1222. and the following actions are taken:
  1223.  
  1224. 1.  Both files are put into the target directory and 
  1225. the older one gets a new name like !SYNnnnn.xxx 
  1226. where nnnn is a number between 0001 and 9999 and xxx 
  1227. is the original extension of the file.
  1228.  
  1229. 2.  A line is appended to the file !SYN0000.TXT in the 
  1230. target directory containing the date, time and 
  1231. conflicting file information separated by semicolons 
  1232. (;), ready for import into a conflict database.
  1233.  
  1234.     One possible purpose of this function is to allow users 
  1235. with portable PCs to copy their network user 
  1236. directories home with them and later reconciliate their 
  1237. local user directories with those on the network if 
  1238. both can have changed.
  1239.  
  1240. Subdirectories  Process subdirectories. All subdirectories of 
  1241. the directory to be synchronized are also processed.
  1242.  
  1243. Preserve    Preserve 
  1244. attributes. With this subcommand the hidden, system and 
  1245. read-only attributes are copied from each source file 
  1246. to each destination file. Without this subcommand, 
  1247. these attributes are reset in the target file.
  1248.  
  1249. Warning:     The Preserve subcommand affects only files 
  1250. that are copied for other reasons. It does not 
  1251. mean that existing equal files will now get 
  1252. their attributes copied if these are different. 
  1253. Keep in mind that the attributes are not used 
  1254. to determine whether two files are equal.
  1255.  
  1256. Report    Write the report file name (complete with path, if 
  1257. desired) after this subcommand. Report all changes to a 
  1258. report text file. If the report text file already 
  1259. exists, the new records/lines are appended.
  1260.  
  1261. The report text file consists of one line for each 
  1262. reported file, followed by one carriage return and one 
  1263. line feed character. Each line contains the following 9 
  1264. fields, separated by tab characters (character no. 9 in 
  1265. the ASCII/ANSI alphabet):
  1266.  
  1267. 1.  Transaction date in the format: YYYY-MM-DD   
  1268. Example: 1994-07-21
  1269.  
  1270. 2.  Transaction time in the 24 h format: HH:MM:SS   
  1271. Example: 23:59:30
  1272.  
  1273. 3.  Operation: ADD, DELETE, OV-ADD, OV-DEL, REN-ADD, 
  1274. REN-DEL. Since each line reports only one file, 
  1275. overwrite and rename operations (which work on two 
  1276. files) are reported in two lines, as if the file 
  1277. were first deleted, then added. The first contains 
  1278. OV-DEL or REN-DEL and reports the disappearing file. 
  1279. The next contains OV-ADD or REN-ADD and reports the 
  1280. new file.
  1281.  
  1282. 4.  File or directory: FILE, DIR
  1283.  
  1284. 5.  Path and file name (if file). Examples: 
  1285. C:\SUBDIR\FILE.EXT, C:\SUBDIR
  1286.  
  1287. 6.  File/dir date in the format: YYYY-MM-DD   Example: 
  1288. 1994-06-15
  1289.  
  1290. 7.  File/dir time in the 24 h format: HH:MM:SS   
  1291. Example: 13:35:50
  1292.  
  1293. 8.  File size in bytes (empty for directories). 
  1294. Example: 1735024
  1295.  
  1296. 9.  File attributes in the format: HSRA with minus 
  1297. signs in the place of attributes that are not set. 
  1298. Example for a file with read-only and archive 
  1299. attributes, but no hidden or system attributes: - - 
  1300. RA
  1301.  
  1302. ReportOnly    Requires the 
  1303. presence of the Report subcommand (see above). No 
  1304. changes are actually made to directories or files. Only 
  1305. the report file is written (appended) as if the changes 
  1306. had been made. This can be used for testing or if the 
  1307. report file is evaluated by other means.
  1308.  
  1309. DirsLike    Only one 
  1310. DirsLike statement can be included with any 
  1311. SynchronizeDir command. If it is present, only matching 
  1312. directories are processed. Write one directory name 
  1313. after this command. The name can contain the wildcard 
  1314. characters * and ? in the same way they are used in DOS 
  1315. commands.
  1316.  
  1317. FilesLike    Only one 
  1318. FilesLike statement can be included with any 
  1319. SynchronizeDir command. If it is included, only 
  1320. matching files are processed. Write one file name after 
  1321. this command. The name can contain the wildcard 
  1322. characters * and ? in the same way they are used in DOS 
  1323. commands.
  1324.  
  1325. ExcludeDir    Protect this 
  1326. directory and all its subdirectories from 
  1327. synchronization, i.e. do not read, compare, copy, 
  1328. change or delete it and do not synchronize it with 
  1329. anything. The directory can be given with full path and 
  1330. even the drive specified. If it is given without a full 
  1331. path, i.e. with neither a drive designator nor a 
  1332. backslash (\) at the beginning, then all directories 
  1333. with this name and all their subdirectories are 
  1334. excluded from synchronization if several occur within 
  1335. the directory tree. The ExcludeDir subcommand can occur 
  1336. several times with different subdirectories. It is 
  1337. useful only when the Subdirectories subcommand is also 
  1338. present.
  1339.  
  1340. ExcludeFile    Protect this 
  1341. file from synchronization, i.e. do not read, compare, 
  1342. copy, change or delete it and do not synchronize it 
  1343. with anything. The file can be given with full path and 
  1344. even with the drive specified. If it is given without a 
  1345. full path, i.e. with neither a drive designator nor a 
  1346. backslash (\) at the beginning, then all files with 
  1347. this name are excluded from synchronization if several 
  1348. occur within the directory, or within the whole 
  1349. directory tree. The file name can contain the wildcard 
  1350. characters * and ? which have the same function as in 
  1351. DOS. The ExcludeFile subcommand can occur several times 
  1352. with different files.
  1353.  
  1354. End SynchronizeDir    This ends the 
  1355. complete SynchronizeDir command. Exactly one space has 
  1356. to be between "End" and "SynchronizeDir". This 
  1357. subcommand is always required after all others.
  1358.  
  1359. Warning:    SynchronizeDir 
  1360. will overwrite or erase files with any attributes in 
  1361. the target directory and, with the Subdirectories 
  1362. subcommand, any of its subdirectories, even if they are 
  1363. read-only, hidden or system files.
  1364.  
  1365. Syntax:
  1366. SynchronizeDir
  1367.   From <source directory>
  1368.   To <target directory>
  1369.   [Delete]
  1370.   [Add]
  1371.   [{ Overwrite | Conflict }]
  1372.   [Subdirectories]
  1373.   [Preserve]
  1374.   [Report <report text file path and name>
  1375.   [ReportOnly]]
  1376.   [DirsLike <directory name with or without path and * or 
  1377.     ? characters>]
  1378.   [FilesLike <file name with or without path and * or ? 
  1379.     characters>]
  1380.   [ExcludeDir <directory>]
  1381.   ...
  1382.   [ExcludeFile <file name with or without path and * or ? 
  1383.     characters>]
  1384.   ...
  1385. End SynchronizeDir
  1386.  
  1387. Examples:
  1388.  
  1389. SynchronizeDir
  1390.   From F:\RSU\WSIMAGE\U
  1391.   To C:\U
  1392.   Delete
  1393.   Overwrite
  1394.   Add
  1395.   Subdirectories
  1396.   FilesLike *.BA*
  1397.   ExcludeDir F:\RSU\WSIMAGE\U\ADMIN
  1398.   ExcludeFile *.BAK
  1399.   Report C:\SETUP\SYNCREP.TXT
  1400.   Preserve
  1401. End SynchronizeDir
  1402.  
  1403. SynchronizeDir
  1404.   From F:\RSU\WSIMAGE\DOS
  1405.   To C:\DOS
  1406.   Overwrite
  1407.   Add
  1408. End SynchronizeDir
  1409.  
  1410. The first example would make the directory C:\U and all of its 
  1411. subdirectories exactly equal to the directory F:\RSU\WSIMAGE\U 
  1412. and all of its subdirectories, as far as *.BA* files are 
  1413. concerned, except for the directory F:\RSU\WSIMAGE\U\ADMIN, 
  1414. which is entirely skipped. If a target directory C:\U\ADMIN 
  1415. exists, it is not touched either. All files with the extension 
  1416. .BAK are skipped. If files with the extension .BAK exist in the 
  1417. target directory, they also remain untouched. If files are 
  1418. copied, their file attributes are copied with them. A report 
  1419. text file C:\SETUP\SYNCREP.TXT is written, containing a list of 
  1420. all file changes.
  1421.  
  1422. The second would overwrite any files in C:\DOS that are 
  1423. different from their namesakes in F:\RSU\WSIMAGE\DOS. It would 
  1424. also add files that are missing in C:\DOS, but it would not 
  1425. delete or otherwise touch any additional files the user may 
  1426. have added to his DOS directory. It would also not touch any 
  1427. subdirectories of C:\DOS.
  1428.  
  1429. SynchronizeDir (Old Syntax)
  1430.  
  1431. This one-line version of the SynchronizeDir command is retained 
  1432. only for compatibility purposes and will be dropped from a 
  1433. future version of RSU. Please don't use it any more.
  1434.  
  1435. Note that the newer exclude subcommands and the ReportOnly 
  1436. subcommand are not available in this old syntax.
  1437.  
  1438. Makes the target directory equal to the source directory 
  1439. including all files, including files that have a read-only, 
  1440. hidden or system attribute.
  1441.  
  1442. SynchronizeDir handles all files regardless of their 
  1443. attributes. Attributes are copied with each file only if the /P 
  1444. switch is used. Without that switch the archive attribute is 
  1445. set and all other attributes are reset in the target file.
  1446.  
  1447. The SynchronizeDir command requires switches to control its 
  1448. operation. The following switches can be used, and at least one 
  1449. of them has to be used, otherwise SyncDir will not do anything:
  1450.  
  1451. /D        Delete files 
  1452. from the target directory if they don't exist in the 
  1453. source directory.
  1454.  
  1455. /A        Add files to 
  1456. the target directory if they are not there already.
  1457.  
  1458. /O        Overwrite files 
  1459. in the target directory if they also exist in the 
  1460. source directory but are different (have different 
  1461. size, date or time). This switch may not be used 
  1462. together with the /C switch.
  1463.  
  1464. /C        Conflict 
  1465. management. This switch may not be used together with 
  1466. the /O switch. If a file name exists in both source and 
  1467. target directories but with different size, date or 
  1468. time, then this is considered a conflict and the 
  1469. following actions are taken:
  1470.  
  1471. 1.  Both files are put into the target directory and 
  1472. the older one gets a new name like !SYNnnnn.xxx 
  1473. where nnnn is a number between 0001 and 9999 and xxx 
  1474. is the original extension of the file.
  1475.  
  1476. 2.  A line is appended to the file !SYN0000.TXT in the 
  1477. target directory containing the date, time and 
  1478. conflicting file information separated by semicolons 
  1479. (;), ready for import into a conflict database.
  1480.  
  1481.     One possible purpose of this function is to allow users 
  1482. with portable PCs to copy their network user 
  1483. directories home with them and later reconciliate their 
  1484. local user directories with those on the network if 
  1485. both can have changed.
  1486.  
  1487. /S        Process 
  1488. subdirectories. All subdirectories of the directory to 
  1489. be synchronized are also processed.
  1490.  
  1491. /R        Report all 
  1492. changes to a report text file. The filename (including 
  1493. path if desired) has to follow the /R switch either 
  1494. with or without an intervening space. If the report 
  1495. text file already exists, the new records/lines are 
  1496. appended.
  1497.  
  1498. The report text file consists of one line for each 
  1499. reported file, followed by one carriage return and one 
  1500. line feed character. Each line contains the following 9 
  1501. fields, separated by tab characters (character no. 9 in 
  1502. the ASCII/ANSI alphabet):
  1503.  
  1504. 1.  Transaction date in the format: YYYY-MM-DD   
  1505. Example: 1994-07-21
  1506.  
  1507. 2.  Transaction time in the 24 h format: HH:MM:SS   
  1508. Example: 23:59:30
  1509.  
  1510. 3.  Operation: ADD, DELETE, OV-ADD, OV-DEL, REN-ADD, 
  1511. REN-DEL. Since each line reports only one file, 
  1512. overwrite and rename operations (which work on two 
  1513. files) are reported in two lines, as if the file 
  1514. were first deleted, then added. The first contains 
  1515. OV-DEL or REN-DEL and reports the disappearing file. 
  1516. The next contains OV-ADD or REN-ADD and reports the 
  1517. new file.
  1518.  
  1519. 4.  File or directory: FILE, DIR
  1520.  
  1521. 5.  Path and file name (if file). Examples: 
  1522. C:\SUBDIR\FILE.EXT, C:\SUBDIR
  1523.  
  1524. 6.  File/dir date in the format: YYYY-MM-DD   Example: 
  1525. 1994-06-15
  1526.  
  1527. 7.  File/dir time in the 24 h format: HH:MM:SS   
  1528. Example: 13:35:50
  1529.  
  1530. 8.  File size in bytes (empty for directories). 
  1531. Example: 1735024
  1532.  
  1533. 9.  File attributes in the format: HSRA with minus 
  1534. signs in the place of attributes that are not set. 
  1535. Example for a file with read-only and archive 
  1536. attributes, but no hidden or system attributes: - - 
  1537. RA
  1538.  
  1539. /P        Preserve 
  1540. attributes. With this switch the hidden, system and 
  1541. read-only attributes are copied from each source file 
  1542. to each destination file. Without this switch, these 
  1543. attributes are reset in the target file.
  1544.  
  1545. Warning:    The /P 
  1546. parameter affects only files that are copied for other 
  1547. reasons. It does not mean that existing equal files 
  1548. will now get their attributes copied if these are 
  1549. different. Keep in mind that the attributes are not 
  1550. used to determine whether two files are equal.
  1551.  
  1552. Warning:    SynchronizeDir 
  1553. will overwrite or erase files with any attributes in 
  1554. the target directory and, with the /S switch, any of 
  1555. its subdirectories, even if they are read-only, hidden 
  1556. or system files.
  1557.  
  1558. Syntax:
  1559. SynchronizeDir <source directory> <target directory> [/D] 
  1560. [< /O | /C >] [/A] [/S] [/R <report text file path and 
  1561. name>] [/P]
  1562.  
  1563. Examples:
  1564. SynchronizeDir F:\RSU\WSIMAGE\U C:\U /D /O /A /S /R 
  1565. C:\SETUP\SYNCREP.TXT /P
  1566. SynchronizeDir F:\RSU\WSIMAGE\DOS C:\DOS /O /A
  1567.  
  1568. The first line would make the directory C:\U and all of its 
  1569. subdirectories exactly equal to the directory F:\RSU\WSIMAGE\U 
  1570. and all of its subdirectories. If files are copied, their file 
  1571. attributes are copied with them. A report text file 
  1572. C:\SETUP\SYNCREP.TXT containing all file changes is written.
  1573.  
  1574. The second would overwrite any files in C:\DOS that are 
  1575. different from their namesakes in F:\RSU\WSIMAGE\DOS. It would 
  1576. also add files that are missing in C:\DOS, but it would not 
  1577. delete or otherwise touch any additional files the user may 
  1578. have added to his DOS directory. It would also not touch any 
  1579. subdirectories of C:\DOS.
  1580.  
  1581. Brief Command Overview
  1582.  
  1583. In the following text each group of syntax lines is followed by 
  1584. one or more example lines which are indented.
  1585.  
  1586. RSU <program file name>
  1587.  
  1588. RSU.EXE <program file name>
  1589.  
  1590. RSU <program file name> /debug
  1591.  
  1592. RSU.EXE <program file name> /debug
  1593.  
  1594. f:
  1595. cd \rsu
  1596. rsu rsu.prg
  1597.  
  1598. Echo <text>
  1599. Echo RSU is now installing new video drivers...
  1600.  
  1601. Goto <label>
  1602. Goto Finish
  1603.  
  1604. <label>:
  1605. Finish:
  1606.  
  1607. If [Not] <condition> Then
  1608.    <command>
  1609.    ...
  1610. [Else
  1611.    <command>
  1612.    ...]
  1613. End If
  1614.  
  1615. If [Not] <condition> Then
  1616.    <command>
  1617.    ...
  1618. [Else
  1619.    <command>
  1620.    ...]
  1621. EndIf
  1622.  
  1623. <condition> = { <text 1> <comparison operator> <text 2> | Exist 
  1624. <filename> | <filename 1> Equal <filename 2> } | 
  1625. Bios(<hexadr>-<hexadr>) = <text>
  1626.  
  1627. <comparison operator> = { < | <= | = | >= | > | <> }
  1628.  
  1629. <hexadr> = 0 .. FFFF
  1630.  
  1631. If Bios(F000-F100) = AMI Then
  1632.    Echo This computer has an AMI Bios.
  1633. End If
  1634. If Not %USER% = SUPERVISOR Then
  1635.    Goto Finish
  1636. End If
  1637. ...
  1638. Finish:
  1639.  
  1640. (The example above also shows how to insert an environment 
  1641. variable.)
  1642.  
  1643. IniAddLine <ini file> [<section name>] <variable name>=<text>
  1644. IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VSHARE.386
  1645. IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=NETWARE.386
  1646.  
  1647. IniChangeLine <ini file> [<section name>] <variable>=<text>
  1648. IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  1649. IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  1650.  
  1651. (The second example above also shows how to insert an 
  1652. environment variable.)
  1653.  
  1654. IniCopyLine <source ini file> <target ini file> [<section 
  1655. name>] <variable>
  1656. IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI 
  1657. [windows] load
  1658. IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI 
  1659. [windows] load=
  1660.  
  1661. IniCopySection <source ini file> <target ini file> [<section 
  1662. name>]
  1663. IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI 
  1664. C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  1665.  
  1666. IniDeleteLine <ini file> [<section name>] <variable>
  1667. IniDeleteLine <ini file> [<section name>] <variable>=
  1668. IniDeleteLine <ini file> [<section name>] <variable>=<value>
  1669. IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  1670. IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  1671. IniDeleteLine C:\WIN31\SYSTEM.INI [386Enh] device=comm.drv
  1672.  
  1673. IniDeleteSection <ini file> [<section name>]
  1674. IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  1675.  
  1676. SynchronizeDir
  1677.   From <source directory>
  1678.   To <target directory>
  1679.   [Delete]
  1680.   [Add]
  1681.   [{ Overwrite | Conflict }]
  1682.   [Subdirectories]
  1683.   [Preserve]
  1684.   [Report <report text file path and name>
  1685.   [ReportOnly]]
  1686.   [DirsLike <directory name with or without path and * or ? 
  1687.     characters>]
  1688.   [FilesLike <file name with or without path and * or ? 
  1689.     characters>]
  1690.   [ExcludeDir <directory>]
  1691.   ...
  1692.   [ExcludeFile <file name with or without path and * or ? 
  1693.     characters>]
  1694.   ...
  1695. End SynchronizeDir
  1696.  
  1697. SynchronizeDir
  1698.   From F:\RSU\WSIMAGE\U
  1699.   To C:\U
  1700.   Delete
  1701.   Overwrite
  1702.   Add
  1703.   Subdirectories
  1704.   FilesLike *.BA*
  1705.   ExcludeDir F:\RSU\WSIMAGE\U\ADMIN
  1706.   ExcludeFile *.BAK
  1707.   Report C:\SETUP\SYNCREP.TXT
  1708.   Preserve
  1709. End SynchronizeDir
  1710.  
  1711. SynchronizeDir
  1712.   From F:\RSU\WSIMAGE\DOS
  1713.   To C:\DOS
  1714.   Overwrite
  1715.   Add
  1716. End SynchronizeDir
  1717.  
  1718. Other features:
  1719. %<environment variable>% is replaced by the contents of 
  1720. the environment variable.
  1721.  
  1722. %% is replaced by %
  1723. "<any text containing spaces>" is taken as one 
  1724. parameter.
  1725.  
  1726. "" is replaced by "
  1727. ___________________________
  1728.  
  1729. 1 The term "workstation" is used here for all user PC's 
  1730. connected to the network, using DOS, not for engineering 
  1731. workstations running Unix or the like.
  1732.  
  1733. 2 Another method is to run it each time the workstation is 
  1734. started, from the AUTOEXEC.BAT file. Since users have few 
  1735. rights on the file server at that time it would be necessary to 
  1736. adjust those rights such that all users have reading rights to 
  1737. all RSU data without being logged in. This may or may not be 
  1738. possible on different network operating systems.
  1739.